Optimal. Leaf size=63 \[ \frac{(2 A-B) \tan (e+f x)}{3 a c^2 f}+\frac{(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.202196, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2967, 2859, 3767, 8} \[ \frac{(2 A-B) \tan (e+f x)}{3 a c^2 f}+\frac{(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2967
Rule 2859
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \frac{A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, dx &=\frac{\int \frac{\sec ^2(e+f x) (A+B \sin (e+f x))}{c-c \sin (e+f x)} \, dx}{a c}\\ &=\frac{(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )}+\frac{(2 A-B) \int \sec ^2(e+f x) \, dx}{3 a c^2}\\ &=\frac{(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )}-\frac{(2 A-B) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{3 a c^2 f}\\ &=\frac{(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )}+\frac{(2 A-B) \tan (e+f x)}{3 a c^2 f}\\ \end{align*}
Mathematica [A] time = 0.569136, size = 108, normalized size = 1.71 \[ \frac{\cos (e+f x) (-2 (A+B) \cos (e+f x)+(4 A-2 B) \cos (2 (e+f x))+8 A \sin (e+f x)+A \sin (2 (e+f x))-4 B \sin (e+f x)+B \sin (2 (e+f x))+6 B)}{12 a c^2 f (\sin (e+f x)-1)^2 (\sin (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.076, size = 93, normalized size = 1.5 \begin{align*} 2\,{\frac{1}{af{c}^{2}} \left ( -1/3\,{\frac{A+B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{3}}}-1/2\,{\frac{A+B}{ \left ( \tan \left ( 1/2\,fx+e/2 \right ) -1 \right ) ^{2}}}-{\frac{3/4\,A+B/4}{\tan \left ( 1/2\,fx+e/2 \right ) -1}}-{\frac{A/4-B/4}{\tan \left ( 1/2\,fx+e/2 \right ) +1}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 0.99171, size = 359, normalized size = 5.7 \begin{align*} -\frac{2 \,{\left (\frac{B{\left (\frac{2 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{3 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - 1\right )}}{a c^{2} - \frac{2 \, a c^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac{2 \, a c^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac{a c^{2} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac{A{\left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{3 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + 1\right )}}{a c^{2} - \frac{2 \, a c^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac{2 \, a c^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac{a c^{2} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}\right )}}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.40067, size = 171, normalized size = 2.71 \begin{align*} -\frac{{\left (2 \, A - B\right )} \cos \left (f x + e\right )^{2} +{\left (2 \, A - B\right )} \sin \left (f x + e\right ) - A + 2 \, B}{3 \,{\left (a c^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c^{2} f \cos \left (f x + e\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 16.2408, size = 578, normalized size = 9.17 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19162, size = 138, normalized size = 2.19 \begin{align*} -\frac{\frac{3 \,{\left (A - B\right )}}{a c^{2}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}} + \frac{9 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, B \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 12 \, A \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 7 \, A + B}{a c^{2}{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}^{3}}}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]